/**
 * author:Administrator
 * date:2016/3/19
 * desc:TODO
 */
'use strict';

let BaseDomainEvent = require('../../lib/BaseDomainEvent.js');

let EVENT_TYPE = {
  LocationCreated: 'LocationCreated',
  LocationDestroyed: 'LocationDestroyed',
  CategoryCreated: 'CategoryCreated',
  CategoryDestroyed: 'CategoryDestroyed',
};

class LocationCreated extends BaseDomainEvent {
  constructor(sagaId, order) {
    super(sagaId, EVENT_TYPE.LocationCreated, order);
  }
}
class LocationDestroyed extends BaseDomainEvent {
  constructor(sagaId, order) {
    super(sagaId, EVENT_TYPE.LocationDestroyed, order);
  }
}
class CategoryCreated extends BaseDomainEvent {
  constructor(sagaId, order) {
    super(sagaId, EVENT_TYPE.CategoryCreated, order);
  }
}
class CategoryDestroyed extends BaseDomainEvent {
  constructor(sagaId, order) {
    super(sagaId, EVENT_TYPE.CategoryDestroyed, order);
  }
}

let events = {
  ENUM_EVENT: EVENT_TYPE,

  LocationCreated: LocationCreated,
  CategoryCreated: CategoryCreated,
  CategoryDestroyed: CategoryDestroyed,
  LocationDestroyed: LocationDestroyed,

};

module.exports = events;


